<!DOCTYPE html>
<style>
td { width: 50px; height: 50px; border: 2px solid blue }
tr:nth-child(2) td:nth-child(1),
tr:nth-child(2) td:nth-child(3),
tr:nth-child(3) td:nth-child(2),
tr:nth-child(4) td:nth-child(1),
tr:nth-child(4) td:nth-child(3) { visibility: hidden }
</style>
Invisible cells should not hide shared collapsed borders.
<table style="border-collapse: collapse">
  <tr>
    <td></td><td></td><td></td>
  </tr>
  <tr>
    <td></td><td></td><td></td>
  </tr>
  <tr>
    <td></td><td></td><td></td>
  </tr>
  <tr>
    <td></td><td></td><td></td>
  </tr>
</table>
